package com.zb.vo;

import com.zb.annotation.NumberPattern;
import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @Author WEN
 * @Date 2024/2/27 0027
 **/
@Data
@ApiModel("商家余额调整对象")
public class FactoryBalanceAdjustVo {
    @NumberPattern(regexp = "^(1|2)$", message = "调整方式参数不合法")
    @ApiModelProperty(value = "调整方式：1-增加，2-减少", required = true, example = "1")
    private Integer adjustMode;

    @NotNull(message = "调整金额不能为空")
    @NumberPattern(regexp = VerificUtil.FLOATING_NUMBER_10_2, required = true, message = "金额最多允许输入8位整数，两位小数")
    @ApiModelProperty(value = "调整金额", required = true)
    private BigDecimal adjustMoney;

    @Length(max = 500, message = "备注长度限制500个字符")
    @ApiModelProperty(value = "备注")
    private String remark;
}
